<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>审核流程</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="/general/guojigang/public/static/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/general/guojigang/public/static/layui/css/customer.css">
</head>
<body>
  <div class="layui-fluid" id="node_edit" style="display: none;">
    <div class="layui-row" id="popSearchRoleTest">
        <div class="layui-col-md11">
            <form class="layui-form" lay-filter="test" style = "margin-top: 20px;">
                <div class="layui-form-item">
                    <label class="layui-form-label">办理人</label>
                    <div class="layui-input-block">
                      <input type="hidden" name="vid" id="vid">
                        <!-- <input type="text" name="uname" id="uname" class="layui-input"> -->
                        <input style="z-index: 19891015000;" onclick = "SelectUserSingle('','','atUid', 'uname', '0','',1)" name="uname" id="uname" placeholder="办理人"  class="layui-input" type="text" >
                        <input name="atUid" id="atUid"   lay-verify="" class="layui-input layui-hide" type="text" >
                    </div>
                </div>
                <div class="layui-form-item">
                  <div class="layui-input-block">
                      <button type="button" id="submit_data" class="layui-btn layui-btn-sm">提交</button>
                  </div>
              </div>
            </form>
        </div>
    </div>
</div>
    <div class="layui-collapse">
        <div class="layui-colla-item">
          <div class="layui-colla-content layui-show">
            <div class="layui-form">
                <table class="layui-table">
                  <colgroup>
                    <col width="150">
                    <col width="150">
                    <col width="200">
                    <col width="200">
                    <col width="200">
                    <col width="200">
                    {if condition="($changeVerifier == 1)"}
                    <col width="250">   
                    {/if}                 
                  </colgroup>
                  <thead>
                    <tr>
                      <th>ID</th>
                      <th>办理状态</th>
                      <th>办理人</th>
                      <th>派发时间</th>
                      <th>接收时间</th>
                      <th>更新时间</th>
                      {if condition="($changeVerifier == 1)"}
                      <th>操作</th>
                      {/if}
                    </tr> 
                  </thead>
                  <tbody>
                    {volist name="list" id="vo"}
                    <tr>
                      <td>{$vo.id}</td>
                      <td>{$vo.status}</td>
                      <td>{$vo.uid}</td>
                      <td>{:date('Y-m-d H:i:s', $vo.ctime)}</td>
                      <td>{$vo.rtime ? date('Y-m-d H:i:s', $vo.rtime) : ''}</td>
                      <td>{$vo.mtime ? date('Y-m-d H:i:s', $vo.mtime) : ''}</td>
                      {if condition="$changeVerifier == 1"}
                      <td>
                        {if condition="$vo.status2 == 0"}
                        <a href="javascript:;" class="edit_item" style="color: blue;">修改办理人</a>
                        {/if}
                        &nbsp;&nbsp;
                        {if condition="$vo.log_show"}
                        <a href="javascript:;" class="show_detail" style="color: blue;">变更明细</a> 
                        {/if}
                      </td>
                      {/if}
                    </tr>
                    {/volist}                     
                  </tbody>
                </table>
              </div>
          </div>
        </div>
      </div>
<script language="javascript" src="/static/js/module.js"></script>
<script src="/general/guojigang/public/static/layui/layui.js" charset="utf-8"></script>
<!-- <script src="/general/guojigang/public/static/layui/delivery/index.js?v=15" charset="utf-8"></script> -->
<script src="/general/guojigang/public/static/layui/jquery.min.js"></script>
<style>
  .alert-modal-box-text-box{
    z-index: 99999999999999;
  }
</style>
<script>
      layui.use(['form', 'table', 'laydate', 'element'], function(){
        var table = layui.table;
        var form = layui.form;


          $(".edit_item").click(function(){
              let val = $(this).parent().parent().children('td').eq(0).html();
              $("#vid").val(val)
              layer.open({
                  type:1,
                  title:'修改办理人',
                  area:['50%','50%'],
                  content: $('#node_edit'),
                  success: function(obj, index){
                  }
              });
          })

          $(".show_detail").click(function(){
              let val = $(this).parent().parent().children('td').eq(0).html();
              console.log(val);
              const logUrl = "/general/guojigang/public/index/delivery/logList";
              layer.open({
                  type:2,
                  title:'流程步骤',
                  area:['90%','90%'],
                  content:logUrl + '?ticket_no=' + val + '&action_type=5',
                  success: function(obj, index){
                  }
              });
          })

          $("#submit_data").click(function(){
              let uname = $("#uname").val();
              let vid = $("#vid").val();
              let para ={
                  id:vid,
                  uname: uname
              };
              $.ajax({
                  type: "POST",
                  url: '/general/guojigang/public/index/delivery/doModifyVerifer',
                  data: para,
                  traditional: true, //是否使用传统的方式浅层序列化,若有数组参数或对象参数需要设置true!!!!!!
                  dataType:"json",
                  success: function(returnData){
                      if(returnData.status == 200){
                          layer.alert(returnData.msg, {
                              closeBtn: 0
                          }, function(){
                              layer.closeAll();
                              //删除这一条
                              // table.reload('delivery_list1', {
                              //     page: {
                              //         curr: 1 //重新从第 1 页开始
                              //     }
                              // })
                              //parent.location.reload(true);//刷新父级页面
                          });
                      }else{
                          layer.alert(returnData.msg, {
                              closeBtn: 0
                          }, function(){
                              layer.closeAll();
                          });
                      }
                  }
              })
          })

      })


  
</script>
</body>
</html>